package com.lzw.cpvideoplayer.mvp.presenter;

import android.content.Context;

import com.lzw.cpvideoplayer.mvp.view.IBaseView;

import java.lang.ref.WeakReference;

public class BaseVideoPresenter<V extends IBaseView> {
    protected WeakReference<V> weak;
    public void onAction(V v){//绑定
        if(weak == null){
            weak = new WeakReference<>(v);
        }

    }
    public void onDetion(){//解绑
        if(weak == null){
            return;
        }
        weak.clear();
        weak = null;
    }
}
